package com.tiancikeji.zaoke.app.biz;

import com.tiancikeji.zaoke.app.exception.CardMismatchException;
import com.tiancikeji.zaoke.app.exception.CardPromotionBindException;
import com.tiancikeji.zaoke.app.exception.DuplicatePhoneException;
import com.tiancikeji.zaoke.app.exception.InvalidPasswordException;
import com.tiancikeji.zaoke.app.exception.InvalidPhoneException;
import com.tiancikeji.zaoke.app.model.order.Order;
import com.tiancikeji.zaoke.app.model.user.User;

public interface UserBiz {

	public User registerSilently(String name);

	public User getUser(long userid, String ticket);

	public boolean addCard(String cardId, /*String cardCode, */User user) throws CardMismatchException, CardPromotionBindException;

	public boolean sendVerifyCode(String phone, User user) throws InvalidPhoneException, DuplicatePhoneException;

	public boolean verifyCode(String code, String phone, User user) throws InvalidPhoneException;

	public User register(String password, String phone, User user) throws InvalidPasswordException, InvalidPhoneException, DuplicatePhoneException;

	public User login(String phone, String password, User oldUser) throws InvalidPasswordException, InvalidPhoneException;

	public int passwd(String password, String new1, String new2, User user);

	public void updateUserOrder(User user, Order order);

	public boolean rename(String name, User user);

}
